https://glot.io/snippets/gg7kdf2fht/raw/main.lua